home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 February
/
PCWorld_2000-02_cd.bin
/
Software
/
Servis
/
FFE
/
MISC.SWG
/
0014_QV-10 CAM (Unofficial).pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-05-11
|
8KB
|
171 lines
96/05/18
QV-10 CAM Format
================
This document describes the CAM file which is used for QV- 10.
This information is not official, but is the result of individual
analysis. The "@@" mark indicates information based on assumptions.
Structure of CAM Format
=======================
CAM format can be divided into four areas.
_______________ __________________________________________
Area Name Data
=============== ==========================================
header area holds information relating
to the other three areas
--------------- ------------------------------------------
comment area used for comments
--------------- ------------------------------------------
thumbnail thumbnail image data for preview (52 x 36)
image area
--------------- ------------------------------------------
image area DCT coding, huffman-coding image data
=============== ==========================================
Structure of Header Area
------------------------
The header area holds the information concerning the size of each
area. The description of the format below appears to be usable.
________________________ _________________________________
Structure Data
======================== =================================
identification mark $07 $20 $4D $4D
(4 Byte)
------------------------ ---------------------------------
number of areas (2 byte) 3 areas so far ($00 $03)
------------------------ ---------------------------------
area size information The set of data below is repeated
(variable length) to match each area number
area ID(2 Byte)
$00 $01 = comment area
$00 $02 = thumbnail image area
$00 $03 = image area
area length(4 Byte)
dummy(10 Byte)
======================== =================================
When three areas are present the total size of the header area becomes
54 Bytes. Each area is stored after the header area, and their lengths
are equal to the area length. The order of storage is; area, ID.
@@: The identification mark will be changed for future machines.
Comment Area
------------
The comment area is located in the ID=1 area of the header part. The
description of the format below appears to be usable.
________________________ _________________________________
Structure Data
======================== =================================
comment information
(variable length) IDs and strings
------------------------ ---------------------------------
end mark(1 Byte) $00
======================== =================================
Comment related information utilizes the format below.
________________________ _________________________________
format information Data
======================== =================================
comment ID(1 Byte) from $01 to $07
------------------------ ---------------------------------
comment(variable length) A string ending with $00
$00 only, if no comment
======================== =================================
Comment ID uses from $01 to $07. Accordingly, its smallest size is
15 Bytes.
In fact, $01 and $05 are used. $01 is for "comments". $05 is for "Date".
@@: $02-$04 and $06-$07 do not appear to be in use. These ID's may
be used when the comments become long or when the comments consist
of several lines.
Compressed Image Area
---------------------
Compressed image area is located in the ID=2 area of the header part.
The description of the format below appears to be usable.
_________________________ _________________________________
Format information Data
========================= =================================
thumbnail image colour information(3Byte)
information (5616 Byte) x 52(X) x 36(Y)
colour information is stored in
the order of R,G,B and each
colour consumes 1Byte
========================= =================================
Size information of the thumbnail image is not seen in the CAM file.
Naturally, we can conclude the size is fixed at 52x36.
52 pixels are in X direction while 36 lines are in Y direction.
Image Area
----------
The image area is located in the ID=3 area of the header part. This
area can be divided into five sections.
__________________________ _______________________________
Format information Data
========================== ===============================
Amount of element data YUV, 3 element ($00 $03)
(2 byte)
-------------------------- -------------------------------
element data size 2 Bytes of element data
(variable length) are stored in a row.
-------------------------- -------------------------------
quantization table 0 Y quantization table for element
(64 Byte)
-------------------------- -------------------------------
quantization table 1 U,V quantization table for
(64 Byte) element
-------------------------- -------------------------------
Y element data Y element's compression data
image size is 480x240
-------------------------- -------------------------------
U element data U element's compression data
image size is 160x120
-------------------------- -------------------------------
V element data V element's compression data
image size is 160x120
========================== ===============================
Any Image data are deconstructed into YUV elements and are then
DCT compressed and symbolized by a haffman code. Image sizes differ
from each other as mentioned above. It seems that the images are
deformed and re-composed using a linking tool.
In order to decode this image data, a haffman table is necessary
in addition to this information. Such additional information is not
included in the CAM file. Compression and dedoding softwareüiQV-10 and
the link toolüj maintains this sort of fixed information inside.
Special Thanks
==============
A software which can directly handle a CAM file is required. I hope
that this modest analysis and related information will help in the
development of such software.
A document which describes the conversion method in a non-interleave
JPEG format is also available. Please refer to this, if necessary.
Finally I would like to thank Mr.Yamamoto (Kawasaki-steel Co.) for his
cooperation concerning the analysis of CAM files. Also I would like to
thank members of palmtop-pc MailingList for offering us a place for
information exchange.
--------------------------------------------------------------------
Kazuhiko Iwama / Texas Instruments Japan Limited
Design Automation Division Japan Branch
E-Mail Address : Texas Instruments ... iwama@ti.com
RIMNET ... with@st.rim.or.jp
--------------------------------------------------------------------